import { ParamsConst } from "../global/ParamsConst";
import { ProxyType } from "../global/ProxyType";
import { SmallSizeFontName } from "./SmallSizeFontName";
import { FontName } from "./FontName";
//class FontUtil

export class FontUtil {
  public static init(): void {
    var loc1 = ParamsConst.instance.proxyType;
    switch (loc1) {
      case ProxyType.Vietnam: {
        FontUtil.defaultFont = new SmallSizeFontName("Courier new");
        FontUtil.songtiFont = new SmallSizeFontName("Courier new");
        FontUtil.xingkaiFont = new SmallSizeFontName("Courier new");
        FontUtil.stXingkaiFont = new SmallSizeFontName("Courier new");
        FontUtil.lishuFont = new SmallSizeFontName("Courier new");
        break;
      }
      case ProxyType.TW: {
        FontUtil.defaultFont = new FontName("Times New Roman");
        FontUtil.songtiFont = new FontName("宋体");
        FontUtil.xingkaiFont = new FontName("宋体");
        FontUtil.stXingkaiFont = new FontName("STXingkai");
        FontUtil.lishuFont = new FontName("宋体");
        break;
      }
      default: {
        FontUtil.defaultFont = new FontName("Times New Roman");
        FontUtil.songtiFont = new FontName("宋体");
        FontUtil.xingkaiFont = new FontName("STXingkai");
        FontUtil.stXingkaiFont = new FontName("STXingkai");
        FontUtil.lishuFont = new FontName("隶书");
        break;
      }
    }
    return;
  }

  public static get defaultName(): string {
    return FontUtil.defaultFont.fontName;
  }

  public static get songtiName(): string {
    return FontUtil.songtiFont.fontName;
  }

  public static get xingkaiName(): string {
    return FontUtil.xingkaiFont.fontName;
  }

  public static get stXingkaiName(): string {
    return FontUtil.stXingkaiFont.fontName;
  }

  public static get lishuName(): string {
    return FontUtil.lishuFont.fontName;
  }

  public static /* const */ EmbedNumberName: string = "number";

  public static /* const */ EmbedSkillName: string = "skillName";

  public static /* const */ EmbedTitleName: string = "title";

  public static /* const */ EmbedBaseName: string = "base";

  public static /* var */ defaultFont: FontName;

  public static /* var */ songtiFont: FontName;

  public static /* var */ xingkaiFont: FontName;

  public static /* var */ stXingkaiFont: FontName;

  public static /* var */ lishuFont: FontName;
}
